<template>
  <div>
    <button @click="openDialog">打开窗口</button>
  </div>

  <Dialog
    v-if="showDialog"
    @close="closeDialog"
  ></Dialog>
</template>

<script setup>
  import { ref } from 'vue'
  import Dialog from './Dialog.vue'

  const showDialog = ref(false)

  const openDialog = () => {
    showDialog.value = true
  }

  const closeDialog = () => {
    showDialog.value = false
  }
</script>

<style lang="less" scoped>

</style>
